package o;

import android.app.Activity;
import android.content.Context;
import com.huawei.appgallery.appcomment.api.CommentReplyActivityProtocol;
import com.huawei.appgallery.appcomment.api.CommentReplyActivityProtocol.Request;
import com.huawei.appgallery.appcomment.impl.bean.GetCommentResBean.AppCommentInfo;

public class bdt {
    private final byte[] ˋ = new byte[0];
    private Context ˎ;

    public bdt(Context context) {
        this.ˎ = context;
    }

    public void ˋ(AppCommentInfo appCommentInfo) {
        int i = 0;
        synchronized (this.ˋ) {
            if (appCommentInfo.ˋॱ() == 1) {
                appCommentInfo.ˋ(0);
                i = 1;
            } else {
                appCommentInfo.ˋ(1);
            }
        }
        cfw.ˎ(new bct(appCommentInfo.ॱ(), cdh.ˎ((Activity) this.ˎ), i), new bdn(appCommentInfo, this.ˎ, i));
    }

    public void ॱ(AppCommentInfo appCommentInfo) {
        int i = 0;
        synchronized (this.ˋ) {
            if (appCommentInfo.ˏॱ() == 1) {
                appCommentInfo.ॱ(0);
                i = 1;
            } else {
                appCommentInfo.ॱ(1);
            }
        }
        cfw.ˎ(new bdg(appCommentInfo.ॱ(), cdh.ˎ((Activity) this.ˎ), i), new bdx(appCommentInfo, this.ˎ, i));
    }

    public void ˏ(AppCommentInfo appCommentInfo, Context context) {
        cjo commentReplyActivityProtocol = new CommentReplyActivityProtocol();
        Request request = new Request();
        request.ˊ(appCommentInfo.ॱ());
        request.ˎ(appCommentInfo.ˎ());
        request.ˏ(appCommentInfo.ʽ());
        request.ˊ(appCommentInfo.ˋॱ());
        request.ˋ(appCommentInfo.ˏॱ());
        request.ˏ(appCommentInfo.ʼॱ());
        commentReplyActivityProtocol.ˏ(request);
        cjk.ˎ().ˋ(context, new cjm("appdetailreply.activity", commentReplyActivityProtocol));
    }
}
